package org.bizming.base.service;

import java.util.List;

import org.bizming.base.BaseModel;

public interface SqlHelper {
	/**
	 * 构建添加sql语句
	 * 
	 * @param o
	 * @param values
	 * @param tableName
	 * @return
	 */
	public String sqlAdd(BaseModel o, List<Object> values, String tableName);

	/**
	 * 构建更新sql语句
	 * 
	 * @param o
	 * @param values
	 * @param tableName
	 * @return
	 */
	public String sqlUpdate(BaseModel o, List<Object> values, String tableName);

	/**
	 * 构建删除sql语句
	 * 
	 * @param tableName
	 * @return
	 */
	public String sqlRemove(String tableName);

	/**
	 * 构建获取sql语句
	 * 
	 * @param tableName
	 * @return
	 */
	public String sqlGet(BaseModel o, String tableName);

	/**
	 * 构建获取总数sql语句
	 * 
	 * @param tableName
	 * @return
	 */
	public String sqlCount(String tableName);

	/**
	 * 构建分页获取获取sql
	 * 
	 * @param cls
	 * @param tableName
	 * @return
	 */
	public <T> String sqlSelectList(Class<T> cls, String tableName);

	/**
	 * 清空数组
	 * 
	 * @param list
	 */
	public void clear(Object objects[]);

	/**
	 * 清空数组
	 * 
	 * @param list
	 */
	public void clear(List<Object> list);

}
